<!--
  描述：产品组详情页
  @author tanghongjun
  @since 2020-08-19 11:18:36
-->
<!DOCTYPE html SYSTEM "http://www.thymeleaf.org/dtd/xhtml1-strict-thymeleaf-4.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

<head>
    <th:block th:replace="common/common :: jscss"/>
    <title>新增或编辑照片</title>
</head>
<body>

<div class="layui-fluid">

    <div class="layui-card">
        <form method="post" action="" class="layui-form" lay-filter="zmn-form">

            <input type="hidden" name="channelId" th:value="${conf.id}"/>

            <div class="layui-split">&nbsp;</div>

            <div class="layui-form-item">
                <label class="layui-form-label ">照片类型：</label>
                <div class="layui-form-mid" style="width:200px">
                    <span th:text="${conf.categName}"></span>
                </div>
            </div>
            <div th:if="${conf.channelNames != null || (conf.channelNames == null && conf.excludeChannelNames  == null)}" class="layui-form-item">
                <label class="layui-form-label">应用渠道：</label>
                <div class="layui-form-mid" style="width:200px">
                    <span th:text="${conf.channelNames == null && conf.excludeChannelNames  == null ? '全渠道'
                            : (conf.channelNames == null ? '' : conf.channelNames)}"></span>
                </div>
            </div>

            <div th:if="${conf.excludeChannelNames != null}" class="layui-form-item">
                <label class="layui-form-label">排除渠道：</label>
                <div class="layui-form-mid" style="width:200px">
                    <span th:text="${conf.excludeChannelNames}"></span>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label ">业务类型：</label>
                <div class="layui-form-mid" style="width: 200px">
                    <span th:if="${conf.bizType == 1||conf.bizType ==null}">C-保外业务</span>
                    <span th:if="${conf.bizType == 2}">F-保内业务</span>
                    <span th:if="${conf.bizType == 3}">B-工程业务</span>
                </div>
            </div>

            <!--            <div class="layui-form-item">-->
            <!--                <label class="layui-form-label ">业务线：</label>-->
            <!--                <div class="layui-form-mid" style="width:200px">-->
            <!--                    <span th:text="${conf.bizLineNames}"></span>-->
            <!--                </div>-->
            <!--            </div>-->

            <div class="layui-form-item">
                <label class="layui-form-label ">服务分类：</label>
                <div class="layui-form-mid" style="width:200px">
                    <span th:text="${conf.servCategNames}"></span>
                </div>
            </div>

            <div class="layui-card-body" id="tablesParent">
                <div th:if="${#lists.isEmpty(standardList)}"
                     id="zmn-audit-table-0"
                     lay-filter="zmn-audit-table-0"
                     style="margin-bottom: 20px">

                    <script type="text/html" id="zmn-table-tool-0">
                        <div class="layui-btn-container">
                            <div class="layui-btn-group">
                                <a href="javascript:;" lay-event="add-0"
                                   class="layui-btn layui-btn-sm layui-btn-primary"
                                   lay-text="新增" text="新增">添加识别物</a>
                            </div>
                        </div>
                    </script>
                </div>

                <!-- 数据表格 -->
                <div th:if="${not #lists.isEmpty(standardList)}">


                    <div th:each="standard,standardStat : ${standardList}"
                         th:id="'zmn-audit-table-' + ${standardStat.index}"
                         th:lay-filter="'zmn-audit-table-'+ ${standardStat.index}"
                         style="margin-bottom: 20px">
                        <fieldset style="border-top: 1px solid transparent;
                                         background: linear-gradient(white,white) padding-box,repeating-linear-gradient(-38deg,#ccc 0, #ccc 0.5em,white 0,white 0.75em);"
                                  th:if="${not standardStat.first }"
                                  class="layui-elem-field layui-field-title">
                            <legend align="center" style="background:white">OR</legend>
                        </fieldset>
                        <script type="text/html" th:id="'zmn-table-tool-' + ${standardStat.index}">
                            <div class="layui-btn-container">
                                <div class="layui-btn-group">
                                    <a href="javascript:;" th:lay-event="'add-'+ ${standardStat.index}"
                                       class="layui-btn layui-btn-sm layui-btn-primary"
                                       lay-text="新增" text="新增">添加识别物</a>
                                </div>
                            </div>
                        </script>
                    </div>
                </div>
            </div>

            <div class="layui-form-item">
                <label class="layui-form-label ">
                    <button class="layui-btn layui-btn-normal" lay-submit lay-filter="zmn-add-audit">添加一组识别物</button>
                </label>
            </div>

            <div class="layui-split">&nbsp;</div>
            <div class="layui-form-item layui-layout-admin">
                <div class="layui-input-block" style="z-index: 999">
                    <div class="layui-footer" style="left: 0;">
                        <button class="layui-btn" lay-submit="" lay-filter="zmn-form-submit">保存
                        </button>
                        <button class="layui-btn layui-btn-primary" onclick="cancel()" id="cancleBtn">
                            取消
                        </button>
                    </div>
                </div>
            </div>

        </form>

    </div>

</div>

<script type="text/javascript" th:inline="javascript">

    var json = {
        conf: [[${conf}]],
        standardList: [[${standardList}]]
    };


    layui.config({
        base: "/static/lay/",
        version: "202008201436"
    }).extend({
        index: "lib/index",
        oms_conf_attachment_orderPicture_auditStandard: "conf/attachment/orderPicture/zmn.oms.conf.orderPicture.auditStandard",
    }).use(['index', 'oms_conf_attachment_orderPicture_auditStandard']);

</script>
</body>
</html>